#ifndef _VIEWS_H_
#define _VIEWS_H_    1

#include <gtk/gtk.h>
#include "ttorrent.h"

enum
{
  S_ACTIVE = 0,
  S_PAUSED,
  S_DONE
};

enum
{
    COL_T_HANDLE = 0,
    COL_T_TABLE,
    COL_T_FILES,
    COL_T_PRIORITIES,
    COL_T_NUM_FILES,
    COL_T_NUMBER,
    COL_T_NAME,
    COL_T_SHA,
    COL_T_SIZE,
    COL_T_STATE,
    COL_T_SEEDS,
    COL_T_SEEDS_SWARM,
    COL_T_PEERS,
    COL_T_PEERS_SWARM,
    COL_T_DOWN_SPEED,
    COL_T_UP_SPEED,
    COL_T_DOWN_PREV,
    COL_T_DOWN_SESS,
    COL_T_UP_PREV,
    COL_T_UP_SESS,
    COL_T_RATIO,
    COL_T_PROGRESS,
    NUM_T_COLS
};

enum
{
    COL_F_ORDER = 0,
    COL_F_PRIORITY,
    COL_F_NEW_PRI,
    COL_F_SIZE,
    COL_F_PATH,
    COL_F_PROGRESS,
    COL_F_EDITED,
    NUM_F_COLS
};

enum
{
    COL_P_IP = 0,
    COL_P_DOWN,
    COL_P_UP,
    COL_P_CLIENT,
    COL_P_FLAGS,
    NUM_P_COLS
};

enum
{
    COL_B_INDEX = 0,
    COL_B_REQUESTED,
    COL_B_COMPLETED,
    COL_B_ALL,
    COL_B_PROGRESS,
    NUM_B_COLS
};

GtkWidget *
create_torrents_view (TTorrent * ttorrent);

GtkTreeView *
create_peers_view ();

GtkTreeView *
create_blocks_view ();

GtkTreeView *
create_files_view ();

GtkWidget *
create_statusbar();

GtkListStore *
create_files_store();

#define create_info_view() gtk_label_new(_("Nothing to show :("))

GtkWidget *
create_options_view(TSettings * ts);

void
update_statusbar(GtkWidget *, TStatus *);

void
query_torrents(GtkTreeView * view, GKeyFile * kf);

#endif
